<?php

namespace app\meizhuangapi\controller;

use app\meizhuangapi\model\vipcard\Card as CardModel;
use app\api\controller\Vipcard as VipcardCon;

/**
 * 用户购买储值卡管理
 */
class Vipcard extends VipcardCon
{
    /**
     * 储值卡列表
     */
    public function index(){
        $money = $this->getUser()['money'];
        $shareholder = $this->getUser()['shareholder'];
        if(!empty($this->getUser()['username'])){
            $username=$this->getUser()['username'];
        }else{
            $username=$this->getUser()['nickName'];
        }
	    // 储值卡列表
        $list = (new CardModel)->getList();
	    return $this->renderSuccess(compact('money','shareholder','list','username'));
       
    }
}
